﻿@model websitev2.Models.ssUser
<script src="@Url.Content("~/js/jquery-1.6.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/jquery.cycle.all.latest.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#slider').cycle({
            pager: '#slider-pager'
        });

        $('.activetab a').each(function () {
            var activeTab = $(this).parents('li').index();
            var paneVisible = $(this).parents('ul').next().children('div').eq(activeTab);
            paneVisible.show().siblings().hide();
        });

        $('.tabs a').click(function () {
            $(this).parents('li').addClass('activetab').siblings().removeClass('activetab');
            var activeTab = $(this).parent('li').index();
            var paneVisible = $(this).parents('ul').next().children('div').eq(activeTab);
            paneVisible.show().siblings().hide();
            return false;
        });

        $('.toggle').click(function () {
            $(this).parents('h3').siblings('.box-content').slideToggle('fast');
            $(this).toggleClass('closed');
            return false;
        })


    });
</script>
<div id="hero-wrap">
    <div id="hero" class="profile section group">
        <div id="user-profile" class="group">
            @if (Request.IsAuthenticated)
            {
                <text> <a href="/Image/Upload/avatar/">
                </text>
            }
            else
            {
                <text>
                </text>
            }
            <img src="@Url.Content(ViewBag.MediumAvatar)" alt="" /> </a>
            <div>
                Username: <span class="group">@Model.UserName</span> <a href="#" id="more">More</a>
                <ul id="dd">
                    @if (Request.IsAuthenticated)
                    {
                        if (Session["oUsername"].ToString() == Model.UserName)
                        {
                         <li><a href="/Image/Upload/avatar/">Upload Avatar</a></li>
                        <li><a href="/Account/ManageAccount/">Manage Account</a></li>
                        
                        }
                        else
                        {
                        <li><a href="#">Send message</a></li>
                        <li><a href="#">Add as friend</a></li>        
                        }

                    }
                    else
                    {
                        <li><a href="/Account/Logon">Add as friend</a></li>
                        <li><a href="/Account/Logon">Send message</a></li>
                    }
                </ul>
            </div>
            <p>
                Member since: <span>@String.Format("{0:dd/MM/yyyy}", Model.CreatedOn)</span></p>
        </div>
        <!-- /user-profile -->
        <ul id="user-stats">
            <li id="trophies">Trophies <span>  @Html.ActionLink((string)ViewBag.UserGen.TrophyCount,null,"TrophyCollection", new { id = @Model.UserName },null)</span></li>
            
            <li id="friends">Friends <span>@ViewBag.UserGen.NumberOfFriends</span></li>
            <li id="level">Level <span>@ViewBag.UserGen.CurrentLevel</span></li>
        </ul>
        <!-- /user-stats -->
    </div>
    <!-- /hero -->
</div>
<!-- /hero-wrap -->
<div id="profile-wrap">
    <div id="profile" class="section group">
        @if (Request.IsAuthenticated)
        {
        }
        else
        {
            @Html.Partial("sitemessages/signupmessage")

        }
        @Html.Partial("userprofile/usagegraph")
        <div class="row group">
            @Html.Partial("userprofile/YourActivity")
            @Html.Partial("userprofile/TopTenApps")
            @Html.Partial("userprofile/UserTrophy")
        </div>
        <div class="row group">
            @Html.Partial("userprofile/UserTrophyProgress")
            @Html.Partial("userprofile/UsagePie")
            @Html.Partial("userprofile/GenericStats")
        </div>
        <!-- / row ground -->
        <!-- 
			<div class="row group">				
				<div class="box onehalf floatleft">
					<h3 class="green">Header <a href="#" class="toggle">Toggle</a></h3>
					<div class="box-content">
						content
					</div><!-- /box-content -->
    </div>
    <!-- /box -->
    <!--
				<div class="box onehalf floatright">
					<h3 class="blue">Header <a href="#" class="toggle">Toggle</a></h3>
					<div class="box-content">
						content
					</div><!-- /box-content -->
    <!--
				</div><!-- /box -->
    <!--
			</div><!-- /group -->
</div>
<!-- /news -->
</div><!-- /news-wrap -->
